<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head>
    <title>Knesset Stat documentation</title>
</head>
<body>
    <h2>
        Overview</h2>
    <p>
        The KnessetStat solution is composed of three seperate projects:</p>
    <ul>
        <li>KnessetStat web site.</li>
        <li>KnessetCore - Contains core classes that the web site uses.</li>
        <li>KnessetCoreTesting - Contains nunit classes that test various aspects of the core
            dll.</li>
    </ul>
    <h2>
        KnessetStat web site</h2>
    <h3>
        Static folder</h3>
    <p>
        The static folder contains pages that are static in nature like about, contact etc.</p>
    <h3>
        Default.aspx</h3>
    <p>
        Currently displays only one tracked attribute, e.g. total working time of knesset
        members during 4 time periods: today, yesterday, last 30 days and last 365 days.
        It is not visually appealing and its quite simple in its structure. Almost no code
        is written there.</p>
    <h3>
        KnessetCore.dll.log4net</h3>
    <p>
        Configures log4net. Currently the configuration defines a log text file for each
        package in KnessetCore dll and for two other more:</p>
    <ol>
        <li>Crirtical errors cought in Global.asax, <span style="font-family: Courier New">Application_Error</span>
            method.</li>
        <li>There is a need for a constant lookout for changes made to the original knesset
            site from which the web site consumes information. Any changes to the way http://www.knesset.gov.il/
            displays information can cause this web site to fail. This log contains any irregular
            data that is not in the expected format.</li>
    </ol>
    <h2>
        KnessetCore</h2>
    <p>
        This project contains the "logic" behind the scenes, it defines various db access
        classes and it contains the engine that information from http://www.knesset.gov.il/.</p>
    <h3>
        DataObjectAccess</h3>
    <p>
        ObjectDataSource classes defined in Default.aspx use classes defined in this package
        to pull information in an easy way. Currently there is only one class which allows
        an easy access to total working time of knesset members data.</p>
    <h3>
        Dbl</h3>
    <p>
        Contains data sets used to implement database access.</p>
    <h3>
        Engines</h3>
    <p>
        An engine in KnessetStat web site represents an action that runs in specific time.
        A special type of engine is called FetcherParserUpdaterEngine (FPU engine) which
        is a compilation of three components: fetcher,
        parser and updater when:</p>
    <ul>
        <li><strong>Fetcher</strong> fetches information from an external source (web site for
            example).</li>
        <li><strong>Parser</strong> parses information that was retrieved using the fetcher.</li>
        <li><strong>Updater</strong> inserts the parsed information into a persistent location
            (currently db).</li>
    </ul>
    <p>
       A FPU engine is running in the following way:</p>
    <p>
        <span style="font-family: Courier New">Run() {<br />
        </span>&nbsp;F fetchedData = fethcer.Fetch();<br />
        &nbsp;O result = parser.Parse(fetchedData);
        <br />
        &nbsp;updater.Update(result);<br />
        }</p>
    <p>
        <span style="font-family: Courier New"></span>&nbsp;</p>

</body>
</html>
